<template>
	<view class="content">
		<fui-drawer :show="drawerShow" direction="left" :maskClosable="true">
			<view class="fui-scroll__view" @click="closeDrawer">
				<scroll-view scroll-y style="height: 720rpx;">
					<view>
						
					</view>
				</scroll-view>
			</view>
		</fui-drawer>
		<view class="indexTopCompany">
			<view style="float:left;" @click="showDrawer">
				<fui-icon name="shop" size="32"></fui-icon>
				<fui-text text="河北三金网络科技有限公司" :size="30" style="margin-left:20rpx"></fui-text>
			</view>
			<view style="float:right">
				<fui-icon name="notice" size="32"></fui-icon>
			</view>
		</view>
		<view style="background:#FFF; margin-top:20rpx; padding:10px;">
			<view style="display:flex;">
				<view style="width:20vw; text-align:center;padding: 20rpx">
					<text style="font-size:50rpx;font-weight:400;">10</text><br>
					<text style="font-size: 20rpx; color:#999">今日待办事务</text>
				</view>
				<view style="width:20vw; text-align:center;padding: 20rpx">
					<text style="font-size:50rpx;font-weight:400;">8749</text>
					<text style="font-weight:400;">.38</text><br>
					<text style="font-size: 20rpx; color:#999">今日营业额</text>
				</view>
				<view style="width:20vw; text-align:center;padding: 20rpx">
					<text style="font-size:50rpx;font-weight:400;">49</text><br>
					<text style="font-size: 20rpx; color:#999">新增客户量</text>
				</view>
				<view style="width:20vw; text-align:center;padding: 20rpx;">
					<view style="border-left:1rpx solid #f0f0f0; padding-left:30rpx">
						<text style="font-size:50rpx;font-weight:400;color:#FF6600">60</text><br>
						<text style="font-size: 20rpx; color:#000">综合经营分</text>
					</view>
				</view>
			</view>
			<view style="padding-top:20rpx;font-size:24rpx;text-align:center;font-weight:normal;color:#999">查看更多数据</view>
		</view>
		<view class="box" style="padding:20rpx 0rpx">
			<fui-grid :columns="5">
				<fui-grid-item v-for="(item,index) in indexGrids" :key="index">
					<view class="fui-grid__cell">
						<image src="/static/fistui/icon_tabbar_3x.png" class="fui-icon" mode="widthFix"></image>
						<text>{{item.name}}</text>
					</view>
				</fui-grid-item>
			</fui-grid>
		</view>
		<view class="box">
			<view class="box_title">正在进行中</view>
			<view class="box_content"></view>
		</view>
		<view class="box">
			<view class="box_title">事务进度</view>
			<view class="box_content"></view>
		</view>
		<button @click="ceshi">接口请求</button>
	</view>
</template>

<script>
	import {getLogin} from '@/api/login.js'

	export default {
		data() {
			return {
				indexGrids: [
					{icon: '', name: '组织'},
					{icon: '', name: '目标'},
					{icon: '', name: '营销'},
					{icon: '', name: '客户'},
					{icon: '', name: '业务'},
				],
				drawerShow: false,
			}
		},
		onLoad() {

		},
		methods: {
			ceshi(){
				getLogin().then(res=>{
					console.log(res,'测试哦');
				})
			},
			showDrawer() {
				this.drawerShow = true
			},
			closeDrawer() {
				this.drawerShow = false
			}
		}
	}
</script>

<style>
	.content {
		
	}
	.indexTopCompany {
		padding: 20rpx;
		background: #FFF;
		height:60rpx
	}
	.fui-scroll__view {
		width: 520rpx;
		flex: 1;
		overflow: hidden;
	}
	
	.fui-title {
		padding: 64rpx 32rpx 32rpx;
		box-sizing: border-box;
		font-weight: bold;
	}
	
	.fui-btn__box {
		padding: 40rpx 0;
		display: flex;
		justify-content: center;
	}
	.box {
		margin-top: 20rpx;
		background-color: #FFF;
	}
	.box_title {
		padding:20rpx;
		border-bottom:1rpx solid #f0f0f0;
	}
	.box_content {
		padding: 20rpx;
		min-height:100rpx;
	}
</style>
